home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.3
/
Video Toaster v4.3.iso
/
3.1
/
toasterall
/
arexx_examples
/
9650rec.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-11-05
|
2KB
|
70 lines
/* Record frames on Sony EVO-9650 */
/* Set serial at 9600 8N1 */
/* Wed Nov 4 13:00:21 1992 */
arg timecode count name
NextFrame=x2c("2B")
OPTIONS RESULTS
TOASTERLIB="ToasterARexx.port"
IF POS(TOASTERLIB , SHOW('Libraries')) = 0 THEN
IF ~ADDLIB(TOASTERLIB , 0) THEN x=Bummer(" Me No Find Toaster Library!")
if ~open(SerialOut,"SER:","a") then
do
say "Can't open serial port SER:."
exit
end
Switcher(TOSW)
Switcher(GOLD) /* Set keypad to frame loading */
RecordFrame("00:00:10:00")
Switcher(DOEN) /* hit enter key to load */
Switcher(TAKE) /* Do whatever transition is selected */
N=Switcher(STAT,KNUM) /* Get the current keypad number, so we know where we started */
Switcher(KEYP) /* hit the '+' key */
do While Switcher(STAT,KNUM)~=N /* Go until we return to the starting frame */
Switcher(DOEN) /* hit enter key to load */
RecordNextFrame()
Switcher(KEYP) /* hit the '+' key */
Switcher(TAKE) /* Do whatever transition is selected */
end
Switcher(TOWB)
exit
/* Make code like hh:mm:ss:ff into sony style bytes */
MakeTC: PROCEDURE
arg TimeCode /* Conveniently, ASCII of the hex numbers are the numbers themselves */
return space(translate(TimeCode,'',':'))||'@'
FindFrame: PROCEDURE EXPOSE SerialOut
arg TimeCode
cmd=x2c(df93)
cmd=cmd||MakeTC(TimeCode)
writech(SerialOut,cmd)
return cmd
RecordFrame: PROCEDURE EXPOSE SerialOut
arg TimeCode
edit_preset_cmd=x2c(dfC0)||'240@'
writeln(SerialOut,edit_preset_cmd)
in_entry_cmd=x2c(de98)||MakeTC(TimeCode)
writeln(SerialOut,in_entry_cmd)
rec_dur_cmd=x2c(df92)||'0001@'
writeln(SerialOut,rec_dur_cmd)
address command "wait 20 secs"
return cmd
RecordNextFrame: PROCEDURE EXPOSE SerialOut
rec_dur_cmd=x2c(df92)||'0001@'
writeln(SerialOut,rec_dur_cmd)
address command "wait 15 secs"
return cmd